package net.tailfish.starter.common.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;

/**
 * @PackageName net.tailfish.starter.common.log
 * @ClassName SnowLoggerFactory
 * @Author tailFish
 * @Date Created in 10:03 2021/5/28
 * @Description 重写 Logger,之后使用该类处理日志打印
 */
public class SnowLoggerFactory implements Logger {

    private final Logger logger;

    public  SnowLoggerFactory(Class<?> clazz){
        logger = LoggerFactory.getLogger(clazz);
    }

    public static SnowLoggerFactory getLogger(Class<?> clazz) {
        return new SnowLoggerFactory(clazz);
    }


    @Override
    public String getName() {
        return this.getName();
    }

    @Override
    public boolean isTraceEnabled() {
        return this.isTraceEnabled();
    }

    @Override
    public void trace(String s) {
        logger.trace(LoggerUtils.logFilter(s));
    }

    @Override
    public void trace(String s, Object o) {
        logger.trace(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void trace(String s, Object o, Object o1) {
        logger.trace(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void trace(String s, Object... objects) {
        logger.trace(LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void trace(String s, Throwable throwable) {
        logger.trace(LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isTraceEnabled(Marker marker) {
        return this.isDebugEnabled(marker);
    }

    @Override
    public void trace(Marker marker, String s) {
        logger.trace(marker,LoggerUtils.logFilter(s));
    }

    @Override
    public void trace(Marker marker, String s, Object o) {
        logger.trace(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void trace(Marker marker, String s, Object o, Object o1) {
        logger.trace(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void trace(Marker marker, String s, Object... objects) {
        logger.trace(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void trace(Marker marker, String s, Throwable throwable) {
        logger.trace(marker,LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isDebugEnabled() {
        return this.isDebugEnabled();
    }

    @Override
    public void debug(String s) {
        logger.debug(LoggerUtils.logFilter(s));
    }

    @Override
    public void debug(String s, Object o) {
        logger.debug(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void debug(String s, Object o, Object o1) {
        logger.debug(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void debug(String s, Object... objects) {
        logger.debug(LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void debug(String s, Throwable throwable) {
        logger.debug(LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isDebugEnabled(Marker marker) {
        return this.isDebugEnabled(marker);
    }

    @Override
    public void debug(Marker marker, String s) {
        logger.debug(marker,LoggerUtils.logFilter(s));
    }

    @Override
    public void debug(Marker marker, String s, Object o) {
        logger.debug(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void debug(Marker marker, String s, Object o, Object o1) {
        logger.debug(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void debug(Marker marker, String s, Object... objects) {
        logger.debug(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void debug(Marker marker, String s, Throwable throwable) {
        logger.debug(marker,LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isInfoEnabled() {
        return this.isInfoEnabled();
    }

    @Override
    public void info(String s) {
        logger.info(LoggerUtils.logFilter(s));
    }

    @Override
    public void info(String s, Object o) {
        logger.info(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void info(String s, Object o, Object o1) {
        logger.info(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void info(String s, Object... objects) {
        logger.info(LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void info(String s, Throwable throwable) {
        logger.info(LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isInfoEnabled(Marker marker) {
        return this.isInfoEnabled(marker);
    }

    @Override
    public void info(Marker marker, String s) {
        logger.info(marker,LoggerUtils.logFilter(s));
    }

    @Override
    public void info(Marker marker, String s, Object o) {
        logger.info(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void info(Marker marker, String s, Object o, Object o1) {
        logger.info(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void info(Marker marker, String s, Object... objects) {
        logger.info(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void info(Marker marker, String s, Throwable throwable) {
        logger.info(marker,LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isWarnEnabled() {
        return this.isWarnEnabled();
    }

    @Override
    public void warn(String s) {
        logger.warn(LoggerUtils.logFilter(s));
    }

    @Override
    public void warn(String s, Object o) {
        logger.warn(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void warn(String s, Object... objects) {
        logger.warn(LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void warn(String s, Object o, Object o1) {
        logger.warn(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void warn(String s, Throwable throwable) {
        logger.warn(LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isWarnEnabled(Marker marker) {
        return this.isWarnEnabled(marker);
    }

    @Override
    public void warn(Marker marker, String s) {
        logger.warn(marker,LoggerUtils.logFilter(s));
    }

    @Override
    public void warn(Marker marker, String s, Object o) {
        logger.warn(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void warn(Marker marker, String s, Object o, Object o1) {
        logger.warn(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void warn(Marker marker, String s, Object... objects) {
        logger.warn(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void warn(Marker marker, String s, Throwable throwable) {
        logger.warn(marker,LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isErrorEnabled() {
        return this.isErrorEnabled();
    }

    @Override
    public void error(String s) {
        logger.error(LoggerUtils.logFilter(s));
    }

    @Override
    public void error(String s, Object o) {
        logger.error(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void error(String s, Object o, Object o1) {
        logger.error(LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void error(String s, Object... objects) {
        logger.error(LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void error(String s, Throwable throwable) {
        logger.error(LoggerUtils.logFilter(s),throwable);
    }

    @Override
    public boolean isErrorEnabled(Marker marker) {
        return this.isErrorEnabled(marker);
    }

    @Override
    public void error(Marker marker, String s) {
        logger.error(marker,LoggerUtils.logFilter(s));
    }

    @Override
    public void error(Marker marker, String s, Object o) {
        logger.error(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o));
    }

    @Override
    public void error(Marker marker, String s, Object o, Object o1) {
        logger.error(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(o),LoggerUtils.logFilter(o1));
    }

    @Override
    public void error(Marker marker, String s, Object... objects) {
        logger.error(marker,LoggerUtils.logFilter(s),LoggerUtils.logFilter(objects));
    }

    @Override
    public void error(Marker marker, String s, Throwable throwable) {
        logger.error(marker,LoggerUtils.logFilter(s),throwable);
    }
}
